<script setup lang="ts">
import { PropType, reactive } from 'vue'
import { Descriptions } from '@/components/Descriptions'
import { useI18n } from '@/hooks/web/useI18n'
import { DescriptionsSchema } from '@/types/descriptions'
import {mCommentData} from "@/api/comment/types";

const { t } = useI18n()

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<mCommentData>>,
    default: () => null
  }
})

const schema = reactive<DescriptionsSchema[]>([
  {
    field: 'articleTitle',
    label: '文章标题'
  },
  {
    field: 'createDate',
    label: '上传时间'
  },
  {
    field: 'userNames',
    label: '上传人'
  },
  {
    field: 'coursePrice',
    label: '文章售价'
  },
  {
    field: 'coursePrimary',
    label: '文章关键字',
  },
  {
    field: 'acticleCategoryName',
    label: '文章分类',
  },
  {
    field: 'likeNum',
    label: '文章点赞量',
  },
  {
    field: 'collectNum',
    label: '文章收藏量',
  },
  {
    field: 'remarks',
    label: '文章评论量',
  },
  {
    field: 'articleHits',
    label: '点击量',
  },
  {
    field: 'articleShare',
    label: '文章分享数',
  },
  {
    field: 'articleShare',
    label: '文章状态',
  },
  {
    field: 'articleContent',
    label: '文章内容',
  }
])
</script>

<template>
  <Descriptions :schema="schema" :data="currentRow || {}">
    <template #importance="{ row }: { row: mCommentData }">

    </template>
  </Descriptions>
</template>
